package org.halk.controller;

import org.halk.componet.HalkConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author halk
 * @Date 2023/7/12 18:13
 */
@RestController
public class MyController {

    @Value("${halk.user}")
    private String user;

    @Resource
    private HalkConfig halkConfig;

    @GetMapping("/get")
    public String get() {
        System.out.println("hello");
        halkConfig.getNames().forEach(System.out::println);
        return "hello!" + user + "  halkConfig: " + halkConfig;
    }
}
